home *** CD-ROM | disk | FTP | other *** search
- {*This is the main form that will call our DLL}
- unit Themain;
-
- interface
-
- uses {*Nothing need be added to the uses clause for this example}
- SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
- Forms, Dialogs, StdCtrls;
-
- {*Add this line of code}
- procedure LoadOurAboutbox(Handle: THandle); {*Export from our DLL}
-
- type
- TMainForm = class(TForm)
- LoadAboutBtn: TButton;
- procedure LoadAboutBtnClick(Sender: TObject);
- private
- { Private declarations }
- public
- { Public declarations }
- end;
-
- var
- MainForm: TMainForm;
-
- implementation
-
- {$R *.DFM}
-
- {*Add this line of code}
- procedure LoadOurAboutbox; external 'THEDLL' index 1; {*Our procedure-
- declaration and the name of the DLL}
-
- procedure TMainForm.LoadAboutBtnClick(Sender: TObject);
- begin
- LoadOurAboutbox(Application.Handle); {*Final step, load the Aboutbox}
- end;
-
- end.
-